package com.amphiesma.gwips;

public class AnimalEntry {
	private double latitude, longitude, altitude, accuracy;
	public boolean hasAltitude;
	private String animalType, commonName, genusName, speciesName, comments; 
	private long time;
	private long _id;
	
	//Constructor used when inserting a row (_id is not known at this stage, it's automatically
	//inserted by the database
	AnimalEntry(String animalType, String commonName, String genusName, String speciesName,
			String comments, double longitude, double latitude, 
			double altitude, double accuracy, long time) {
		
		this.animalType = animalType;
		this.commonName = commonName;
		this.genusName = genusName;
		this.speciesName = speciesName;
		this.comments = comments;
		
		this.latitude = latitude;
		this.longitude = longitude;
		this.altitude = altitude;
		this.accuracy = accuracy;
		
		this.time = time;
	}	
	
	//Constructor used when retrieving records. At this stage, _id is already known, so
	//it is filled in
	AnimalEntry(long id, String animalType, String commonName, String genusName, String speciesName,
			String comments, double longitude, double latitude, 
			double altitude, double accuracy, long time) {
		
		this(animalType, commonName, genusName, speciesName, comments, longitude, latitude,
				altitude, accuracy, time);
		this._id = id;
	}


	/*PS: I love Eclipse. The "generate getters and setters" feature saved me a ton of pain.
	To be honest, I probably wouldn't have bothered and would just have made the fields public.
	Not a big fan of the get/set obsession that Java peeps have. :\ */
	public long getId() {
		return _id;
	}	
	
	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getAltitude() {
		return altitude;
	}

	public void setAltitude(double altitude) {
		this.altitude = altitude;
	}

	public double getAccuracy() {
		return accuracy;
	}

	public void setAccuracy(double accuracy) {
		this.accuracy = accuracy;
	}

	public String getAnimalType() {
		return animalType;
	}

	public void setAnimalType(String animalType) {
		this.animalType = animalType;
	}

	public String getCommonName() {
		return commonName;
	}

	public void setCommonName(String commonName) {
		this.commonName = commonName;
	}

	public String getGenusName() {
		return genusName;
	}

	public void setGenusName(String genusName) {
		this.genusName = genusName;
	}

	public String getSpeciesName() {
		return speciesName;
	}

	public void setSpeciesName(String speciesName) {
		this.speciesName = speciesName;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}
	
	
}
